1. Field of the Invention
The invention relates generally to memory management in a computer system and, more particularly, to an improved memory address translation mechanism for boosting performance of real-time applications running on a computer system.
2. Description of the Related Art
In a modern computer system, a technique known as virtual memory is used to manage the resource of physical or real memory of the computer system. This technique provides to the application an illusion of a very large amount of memory. Originally, the virtual memory system was developed to solve the problem of having too little physical or real memory. Although this may no longer be a factor in most modern systems having plenty of memory, the virtual memory mechanism itself has proven valuable for other reasons. Among these reasons, the virtual memory mechanism simplifies memory allocation and/or memory protection as well as application program design.
In a virtual memory system, virtual addresses are translated into real addresses with page tables having a plurality of page table entries (PTEs). Typically, such page tables are stored in a main memory of the computer system such as a DRAM chip. However, there is a bottleneck between the CPU and the main memory since the memory bus connecting between the CPU and the main memory is much slower than the operating speed of the CPU. For certain applications that do not require real-time response, this bottleneck may not pose a legitimate concern. However, many real-time applications may find this bottleneck causing a discernable delay in the operation of such applications.
A known technique to get around this bottleneck problem is to store PTEs in a special cache called a translation lookaside buffer (TLB), which is close to the Central Processing Unit (CPU). Typically, the TLB resides on-chip within the CPU to eliminate or significantly reduce any delay associated with looking up page tables in a main memory, as long as a particular set of PTE(s) searched by the CPU happens to be stored in the TLB. When the particular set of PTE(s) is not found in the TLB, this event is typically defined as a TLB miss.
Generally, as memory read and/or write requests are made, the mapping from the virtual to real memory is cached in the TLB. When there is a TLB miss, either dedicated hardware or software must reload the TLB with the correct PTE. A software reload as well as hardware reload of the TLB can be fairly costly in terms of performance, because such a reload would require reading PTEs from the main memory and looking for a match. Typically, it can take up to three cache line misses to find a match. In real-time applications, therefore, it is undesirable to have a TLB miss.
Therefore, there is a need for a system and method for managing memory for real-time applications in a computer system.